Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/multiphase material #675

Merged
merged 14 commits into from
Jul 25, 2020
Merged

Conversation

bodhinandach
Copy link
Contributor

@bodhinandach bodhinandach commented Jul 22, 2020

Describe the PR
This PR added an enhancement to deal with multiphase material initialization from file, which is essential for two_phase_particle either in explicit or implicit solver, or later on three_phase_particle. The current proposal will work ok with MPI transfer or read from hdf5 for the single-phase particle as I am using a default phase argument to be solid. However, hdf5 initialization and MPI transfer process for two-phase is not yet implemented. This should be integrated after we find an approach to deal with multiphase hdf5 output (@kks32 is investigating that).

Related Issues/PRs
#633

Additional context
I also added a small modification of pressure smoothing. @tianchiTJ @WeijianLiang Can we store pore_pressure as a state variable in the fluid material? By doing so, we can use the same smoothing routine as we use in the single-phase pressure.

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #675 into develop will increase coverage by 0.03%.
The diff coverage is 93.75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #675      +/-   ##
===========================================
+ Coverage    96.62%   96.66%   +0.03%     
===========================================
  Files          123      122       -1     
  Lines        25318    25352      +34     
===========================================
+ Hits         24463    24504      +41     
+ Misses         855      848       -7     
Impacted Files Coverage Δ
include/mesh.h 100.00% <ø> (ø)
include/solvers/mpm_base.h 0.00% <ø> (ø)
include/solvers/mpm_explicit.tcc 63.20% <ø> (+5.11%) ⬆️
tests/io/write_mesh_particles.cc 87.67% <0.00%> (ø)
include/solvers/mpm_base.tcc 73.69% <84.21%> (+0.16%) ⬆️
include/particles/particle.tcc 94.13% <90.57%> (-0.23%) ⬇️
include/mesh.tcc 83.90% <100.00%> (+0.56%) ⬆️
include/particles/particle.h 100.00% <100.00%> (ø)
include/particles/particle_base.h 100.00% <100.00%> (ø)
tests/io/write_mesh_particles_unitcell.cc 88.10% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72bbd93...1e1b8f7. Read the comment docs.

Copy link
Contributor

@kks32 kks32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should set the materials_ size in the particle constructor and not allow to add more than 1 material, if the particle type doesn't support it.

include/generators/injection.h Outdated Show resolved Hide resolved
include/mesh.h Outdated Show resolved Hide resolved
include/mesh.h Outdated Show resolved Hide resolved
include/mesh.tcc Outdated Show resolved Hide resolved
include/mesh.tcc Outdated Show resolved Hide resolved
include/mesh.tcc Outdated Show resolved Hide resolved
include/mesh.tcc Outdated Show resolved Hide resolved
include/particles/particle.tcc Outdated Show resolved Hide resolved
include/generators/injection.h Show resolved Hide resolved
include/mesh.tcc Show resolved Hide resolved
include/particles/particle.tcc Show resolved Hide resolved
@bodhinandach
Copy link
Contributor Author

@kks32 I added another enhancement in the material_sets which has been recently merged so that user can specify the phase_id for assigning material using material set. If they don't specify the phase_id, mpm::ParticlePhase::Solid is used as default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants